package com.ktwlsoft.archivemanage.domain.business.repositoryService.businessInspectTem;

import java.util.List;

import com.ktwlsoft.archivemanage.domain.dao.entity.businessInspectTem.InspectTemSubjectItem;
import org.springframework.stereotype.Service;

import com.github.pagehelper.PageHelper;
import com.github.pagehelper.PageInfo;
import com.ktwlsoft.archivemanage.domain.dao.repository.businessInspectTem.IInspectTemSubjectItemMapper;

/**
 * inspect_tem_subject_item--指导模板题目选项业务层接口实现类
 *
 * @author zhuhe on 2019-11-06 15:56:32
 * @version 1.0
 */
@Service
public class InspectTemSubjectItemRepositoryService {
	
	private final IInspectTemSubjectItemMapper InspectTemSubjectItemMapper;

	public InspectTemSubjectItemRepositoryService(IInspectTemSubjectItemMapper InspectTemSubjectItemMapper) {
		this.InspectTemSubjectItemMapper = InspectTemSubjectItemMapper;
	}

	/**
 	 * 查询分页 on 2019-11-06 15:56:32
 	 * @param pn 第几页
     * @param pageSize 每页多少条
 	 * @param inspectTemSubjectItem inspectTemSubjectItem
 	 * @return PageInfo<InspectTemSubjectItem>
 	 */
	public PageInfo<InspectTemSubjectItem> findPage(int pn, int pageSize, InspectTemSubjectItem inspectTemSubjectItem) {
		PageHelper.startPage(pn,pageSize);
		PageInfo<InspectTemSubjectItem> pageInfo = new PageInfo<InspectTemSubjectItem>(InspectTemSubjectItemMapper.findList(inspectTemSubjectItem));
		return pageInfo;
	}

    /**
	 * 查询集合 on 2019-11-06 15:56:32
	 * @param inspectTemSubjectItem inspectTemSubjectItem
	 * @return List<InspectTemSubjectItem>
	 */
	public List<InspectTemSubjectItem> findList(InspectTemSubjectItem inspectTemSubjectItem) {
		return InspectTemSubjectItemMapper.findList(inspectTemSubjectItem);
	}

    /**
	 * 根据ID查询信息 on 2019-11-06 15:56:32
	 * @param id	主键
	 * @return InspectTemSubjectItem
	 */
	public InspectTemSubjectItem getById(Long id){
		return InspectTemSubjectItemMapper.getById(id);
	}

   /**
	 * 新增 on 2019-11-06 15:56:32
	 * @param inspectTemSubjectItem inspectTemSubjectItem
	 * @return int
	 */
	public int insert(InspectTemSubjectItem inspectTemSubjectItem){
		return InspectTemSubjectItemMapper.insert(inspectTemSubjectItem);
	}

	/**
	 * 批量插入 on 2019-04-23 10:57:02
	 * @param list list
	 * @return int
	 */
	public int manyInsert(List<InspectTemSubjectItem> list){
		return InspectTemSubjectItemMapper.manyInsert(list);
	}

   /**
	 * 修改 on 2019-11-06 15:56:32
	 * @param inspectTemSubjectItem inspectTemSubjectItem
	 * @return int
	 */
	public int update(InspectTemSubjectItem inspectTemSubjectItem){
		return InspectTemSubjectItemMapper.update(inspectTemSubjectItem);
	}

   /**
	 * 根据id集合批量删除信息 on 2019-11-06 15:56:32
	 * @param guidanceTemSubjectItemArr	主键编号集合
	 * @return int
	 */
	public int deleteByIds(List<Long> guidanceTemSubjectItemArr){
		return InspectTemSubjectItemMapper.deleteByIds(guidanceTemSubjectItemArr);
	}

   /**
	 * 根据id删除信息 on 2019-11-06 15:56:32
	 * @param id id
	 * @return int
	 */
	public int deleteById(Long id){
		return InspectTemSubjectItemMapper.deleteById(id);
	}
}
